package com.edu.tool.bean.user;

import com.baomidou.mybatisplus.annotation.TableName;
import com.edu.tool.bean.BaseBean;

import java.util.Date;

@TableName("s_captcha_token")
public class SysCaptchaToken extends BaseBean {

    private Date validTime;
    private String token;

    private String captcha;

    private String status;

    private Integer verifyTimes;

    private String clientIp;

    public SysCaptchaToken(  Date validTime, String token, String captcha, String status, Integer verifyTimes, String clientIp) {

        this.token = token;
        this.captcha = captcha;
        this.status = status;
        this.verifyTimes = verifyTimes;
        this.clientIp = clientIp;
        this.validTime = validTime;
    }

    public SysCaptchaToken() {
        super();
        verifyTimes = 0;
    }

    public SysCaptchaToken( String status, Integer verifyTimes) {
        this.status = status;
        this.verifyTimes = verifyTimes;
    }


    public Date getValidTime() {
        return validTime;
    }

    public void setValidTime(Date validTime) {
        this.validTime = validTime;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token == null ? null : token.trim();
    }

    public String getCaptcha() {
        return captcha;
    }

    public void setCaptcha(String captcha) {
        this.captcha = captcha == null ? null : captcha.trim();
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public Integer getVerifyTimes() {
        return verifyTimes;
    }

    public void setVerifyTimes(Integer verifyTimes) {
        this.verifyTimes = verifyTimes;
    }

    public String getClientIp() {
        return clientIp;
    }

    public void setClientIp(String clientIp) {
        this.clientIp = clientIp == null ? null : clientIp.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", validTime=").append(validTime);
        sb.append(", token=").append(token);
        sb.append(", captcha=").append(captcha);
        sb.append(", status=").append(status);
        sb.append(", verifyTimes=").append(verifyTimes);
        sb.append(", clientIp=").append(clientIp);
        sb.append("]");
        return sb.toString();
    }
}